home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / bbs_tee.zip / BBS_TEE.DOC next >
Text File  |  1987-06-10  |  4KB  |  93 lines

  1.  
  2. These are two quick files that add a micro-bbs to a Yam-Host operation.
  3.  
  4. bbs.c - I know it is filled with gotos and you don't like that, but I
  5.     was in a hurry and it works. Anyone wants to fix it or enhance
  6.     it just send me a copy!
  7.  
  8.     bbs is a small signon/bbs program that maintains a simple users
  9.     database consisting of a 25 character name (plus a NULL) and a
  10.     10 character password (plus a NULL).  The pasword is case-sensitive
  11.     and the name is forced to lowercase with uppercase first letters.
  12.     Also stored is a 2-byte count of the number of times that user has
  13.     signed on.
  14.  
  15.     after challeng.t has accepted a name from the user call bbs like:
  16.  
  17.     !~bbs %remote 0 0
  18.  
  19.     %remote is the user's first AND last names as gathered by challeng.t
  20.     and may be in any case.  The first 0 is a flag that says that this
  21.     user has not signed on yet.  If the first 0 is a 1 then the password
  22.     gathering is skipped and the bbs program will skip to the micro-bbs
  23.     mail routines.
  24.  
  25.     The second 0 indicates that there is a remote user involved. If the
  26.     second 0 is a 1 then the carrier checking and modem i/o are not done.
  27.     This allows you to run it locally with the command line:
  28.  
  29.     bbs your name 0 1    or    bbs your name 1 1
  30.  
  31.     You may then read or send mail from your keyboard without being
  32.     on-line.  If the mode is local (second 0 is 1) then you may read
  33.     all personal messages in the micro-bbs by entereing the letter 's'
  34.     at the menu prompt (even though 's' is not indicated in the menu).
  35.     If you are in the local mode then 'u' will prompt you as to whether
  36.     you want to delete each user as you go through the list.
  37.  
  38.     As the file is set up now it assumes COM1 (change to COM2 by modifying
  39.     0x3f in carrier() to 0x2f.  It also assumes a subdirectory to the
  40.     root directory called 'rem' for the users.bbs file and the msgs.bbs
  41.     file.  These can be changed and then re-compiled.  The existing
  42.     source is for MSC v4.+ ... changes to other compilers should only
  43.     involve the int86() calls that use the header dos.h and the REGS
  44.     union for doing bios interupts.
  45.  
  46.     The msgs.bbs file consists of the name of the user that the message
  47.     is to and the number of the message.  The number is converted to a
  48.     .msg filename (number 4 would be 00004.msg etc...) and the message
  49.     is saved or read as that file.
  50.  
  51.     The first record of the users file contains the number of users (ie
  52.     records in the file!) and the record number of the last user.  The
  53.     msgs.bbs file's first record consists of the next message number (for
  54.     that message's filename) and the number of messages (records) in the
  55.     msgs.bbs file.  Both the users and the msgs first records are padded
  56.     to be the same length as the regular records in the file to allow for
  57.     the (very simple) random record routines.
  58.  
  59.  
  60. tee.c - tee is a filter that may be used to redirect stdout to the screen and
  61.     the modem at the same time.  It also does carrier checking (COM1 see
  62.     above about changing to COM2).  Very simple stuff as it just gathers
  63.     stdout stuff and sends to stderr and the modem.  I did add checking
  64.     after sending each character for ^S to pause, ^K, ^X & ^C to abort.
  65.     The check is made of both the local keyboard and the modem.  The same
  66.     info re compiling under non-MSC v4.+ applies here as well as the
  67.     routine inkey() you will have to supply that one.  inkey() just
  68.     checks the local keyboard and returns either NULL if nothing is there
  69.     or the character enetered if there is one waiting.
  70.     
  71.     I use it to supply a .arc file directory (trapped in checkrmt.t) like
  72.     this:
  73.  
  74.     !~pkxarc -v arcfn |tee
  75.  
  76.     tee.c could be written to redirect i/o from stdout to stderr, a file,
  77.     the printer and the modem ... I am working on it!
  78.  
  79.     I hope that you find these as useful as I have and would appreciate
  80.     hearing from anyone who has made any changes or improvements!
  81.  
  82.     All the modem routines are based on ansiterm.c and used with thanks
  83.     in both bbs.c and tee.c.
  84.  
  85.  
  86. 06/10/87 - Simon J. Ewins,        Voice:  (416) 967-1255
  87.        2 Bloor St., West,         Data:  (416) 967-5745
  88.        #100-501,
  89.        Toronto, Ontario,
  90.        CANADA.  M4W 3E2
  91.  
  92.  
  93.